<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="cmd.css" rel="stylesheet" type="text/css">
<title>GRUB4DOS 外置菜单解释</title>
</head>

<body>
<p><a href="./GRUB4DOS9-1菜单解释_内置.htm">内置菜单详解 </a><span class="Notes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>外置菜单详解 <span class="Notes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="./GRUB4DOS9-3菜单解释_其他1.htm">其他菜单详解1</a> <span class="Notes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="./GRUB4DOS9-4菜单解释_其他2.htm">其他菜单详解2</a> <span class="Notes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="./GRUB4DOS9-5菜单解释_其他3.htm">其他菜单详解3</a></p>
<h2>发行版grub4dos压缩包中外置菜单menu.lst文件详解</h2>
#====================<strong>&nbsp;初始化命令组</strong>（菜单头）部分=========================
<p class="Notes"># This is a sample menu.lst file. You should make some changes to it.<br>
  # The old install method of booting via the stage-files has been removed.<br>
  # Please install GRLDR boot strap code to MBR with the bootlace.com<br>
# utility under DOS/Win9x or Linux.</p>
<p><span class="bat">color</span> <strong>blue/green yellow/red white/magenta white/magenta</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置菜单颜色</span>  <br>
  <span class="bat">timeout</span> <strong>30</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;菜单等待时间</span>  <br>
<span class="bat">default</span><strong> /default</strong><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;设置默认菜单项，需default文件配合，可参见目录索引 default 部分</span></p>
<p>#====================<strong>菜单项</strong>（菜单正文）=================================</p>
<p><span class="Options">title</span> <strong>find and load NTLDR of Windows NT/2K/XP</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置菜单项标题</span>  <br>
  <span class="bat">fallback</span> <strong>1</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;本项菜单执行出错的话就转到菜单项1（本菜单文件中为下一菜单项）继续执行<br>
  # &nbsp;&nbsp;&nbsp;（本项菜单为菜单项0，菜单项从0开始编号）</span><br>
  <span class="bat">find</span> <span class="Options">--set-root --ignore-floppies --ignore-cd</span> <strong>/ntldr</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;在所有设备的根目录下查找 ntldr文件，忽略软驱和光驱设备，找到的话就将该设备设为根，未找到则执行 fallback 1</span><br>
  <span class="bat">map</span> <strong>() (hd0)</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;将 ntldr 所在设备（现在的当前设备） 映射为 第一磁盘(hd0) </span><br>
  <span class="bat">map</span> <strong>(hd0) ()</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;将 第一磁盘(hd0)  映射为 ntldr 所在设备（现在的当前设备） </span>  <br>
  <span class="bat">map</span> <span class="Options">--rehook</span><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;使仿真生效</span><br>
  <span class="bat">find</span> <span class="Options">--set-root --ignore-floppies --ignore-cd</span> <strong>/ntldr</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;在所有设备的根目录下查找 ntldr文件，忽略软驱和光驱设备，找到的话就将该设备设为根</span>  <br>
  <span class="bat">chainloader</span> <strong>/ntldr</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;加载当前设备根目录下的 ntldr 文件</span><br>
<span class="bat">savedefault</span> <span class="Options">--wait=</span><strong>2</strong><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;将当前菜单项保存为默认菜单项，下次再加载本菜单文件时自动将当前菜单项设置为默认菜单项</span></p>
<p><span class="Options">title</span> <strong>find and load BOOTMGR of Windows VISTA/2K8/win7</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置菜单项标题</span>  <br>
  <span class="bat">fallback</span><strong> 2</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;本项菜单执行出错的话就转到菜单项2（本菜单文件中为下一菜单项）继续执行</span>  <br>
  <span class="bat">find</span> <span class="Options">--set-root --ignore-floppies --ignore-cd</span> <strong>/bootmgr</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;在所有设备的根目录下查找 bootmgr文件，忽略软驱和光驱设备，找到的话就将该设备设为根，未找到则执行 fallback 2</span><br>
  <span class="bat">map</span> <strong>() (hd0)</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;将 ntldr 所在设备（现在的当前设备） 映射为 第一磁盘(hd0) </span>  <br>
  <span class="bat">map</span> <strong>(hd0) ()</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;将 第一磁盘(hd0)  映射为 ntldr 所在设备（现在的当前设备） </span>  <br>
  <span class="bat">map</span> <span class="Options">--rehook</span><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;使仿真生效</span>  <br>
<span class="bat">find</span> <span class="Options">--set-root --ignore-floppies --ignore-cd</span> <strong>/bootmgr</strong><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;在所有设备的根目录下查找 bootmgr文件，忽略软驱和光驱设备，找到的话就将该设备设为根</span><br>
  <span class="bat">chainloader</span> <strong>/bootmgr</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;加载当前设备根目录下的 bootmgr 文件</span>  <br>
<span class="bat">savedefault</span> <span class="Options">--wait=</span><strong>2</strong><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;将当前菜单项保存为默认菜单项，下次再加载本菜单文件时自动将当前菜单项设置为默认菜单项</span></p>
<p><span class="Options">title </span><strong>find and load CMLDR, the Recovery Console of Windows NT/2K/XP</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置菜单项标题</span>  <br>
  <span class="bat">fallback</span><strong> 3</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;本项菜单执行出错的话就转到菜单项3（本菜单文件中为下一菜单项）继续执行</span>  <br>
  <span class="bat">find</span> <span class="Options">--set-root --ignore-floppies --ignore-cd</span> <strong>/cmldr</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;在所有设备的根目录下查找 cmldr文件，忽略软驱和光驱设备，找到的话就将该设备设为根，未找到则执行 fallback 3</span><br>
  <span class="bat">map</span> <strong>() (hd0)</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;将 ntldr 所在设备（现在的当前设备） 映射为 第一磁盘(hd0) </span>  <br>
  <span class="bat">map</span> <strong>(hd0) ()</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;将 第一磁盘(hd0)  映射为 ntldr 所在设备（现在的当前设备） </span>  <br>
  <span class="bat">map</span> <span class="Options">--rehook</span><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;使仿真生效</span>  <br>
  <span class="bat">find</span> <span class="Options">--set-root --ignore-floppies --ignore-cd</span> <strong>/cmldr</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;在所有设备的根目录下查找 cmldr文件，忽略软驱和光驱设备，找到的话就将该设备设为根</span>  <br>
  <span class="bat">chainloader</span> <strong>/cmldr</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;加载当前设备根目录下的 cmldr 文件</span>  <br>
  <span class="Notes">#####################################################################<br>
  # write string &quot;cmdcons&quot; to memory 0000:7C03 in 2 steps:<br>
  #####################################################################</span><br>
  <span class="bat">write</span> <strong>0x7C03 0x63646D63</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;step 1. Write 4 chars "cmdc" at 0000:7C03<br>
#&nbsp;&nbsp;&nbsp;ascii码对应关系： c-0x63h   m-0x6Dh  d-0x64h ，写入内存地址 0x7C03处<br>
#&nbsp;&nbsp;&nbsp;写入内存时需倒序写入，即想写入&quot;cmdc&quot;须写入&ldquo;cdmc&rdquo;，对应ascii码为 0x63646D63</span><BR>
<span class="bat">write</span> <strong>0x7C07   0x00736E6F</strong><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;step   2. Write 3 chars "ons" and an ending null at 0000:7C07</span> <br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;ascii码对应关系： o-0x6Fh   n-0x6Eh  s-0x73h ，写入内存地址 0x7C07处<br>
#&nbsp;&nbsp;&nbsp;写入内存时需倒序写入，即想写入&quot;ons&quot;须写入&ldquo;sno&rdquo;，对应ascii码为 0x00736E6F</span><br>
  <span class="bat">savedefault</span> <span class="Options">--wait=</span><strong>2</strong><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;将当前菜单项保存为默认菜单项，下次再加载本菜单文件时自动将当前菜单项设置为默认菜单项</span></p>
<p><span class="Options">title </span><strong>find and load IO.SYS of Windows 9x/Me</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置菜单项标题</span>  <br>
  <span class="bat">fallback </span><strong>4</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;本项菜单执行出错的话就转到菜单项4（本菜单文件中为下一菜单项）继续执行</span>  <br>
  <span class="bat">find </span><span class="Options">--set-root</span> <strong>/io.sys</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;在所有设备的根目录下查找 io.sys文件，找到的话就将该设备设为根</span>  <br>
  <span class="bat">chainloader</span> <strong>/io.sys</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;加载当前设备根目录下的 io.sys 文件</span>  <br>
<span class="bat">savedefault</span> <span class="Options">--wait=</span><strong>2</strong><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;将当前菜单项保存为默认菜单项，下次再加载本菜单文件时自动将当前菜单项设置为默认菜单项</span></p>
<p><span class="Options">title </span><strong>find and boot 0PE.ISO</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置菜单项标题</span>  <br>
  <span class="bat">fallback </span><strong>5</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;本项菜单执行出错的话就转到菜单项5（本菜单文件中为下一菜单项）继续执行</span>  <br>
  <span class="bat">find</span> <span class="Options">--set-root</span><strong> /0PE/0PE.ISO</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;在所有设备的/0PE/目录下查找 0PE.ISO文件，找到的话就将该设备设为根</span>  <br>
  <span class="bat">map</span> <strong>/0PE/0PE.ISO</strong> <span class="bat">(0xff)</span> <span class="Options">||</span> <span class="bat">map</span> <span class="Options">--mem</span> /0PE/0PE.ISO <span class="bat">(0xff)</span><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;先尝试将iso镜像直接仿真为 (0xff)（要求镜像连续存放），失败的话再将iso镜像载入内存仿真为(0xff)</span><br>
  <span class="bat">map</span> <span class="Options">--hook</span><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;使仿真生效</span><br>
  <span class="bat">chainloader</span> <strong>(0xff)</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;从(0xff)设备启动 </span><br>
  <span class="bat">savedefault</span> <span class="Options">--wait=</span><strong>2</strong><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;将当前菜单项保存为默认菜单项，下次再加载本菜单文件时自动将当前菜单项设置为默认菜单项</span></p>
<p><span class="Options">title</span> <strong>find and boot MicroPE.ISO</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置菜单项标题</span>  <br>
  <span class="bat">fallback</span> <strong>6</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;本项菜单执行出错的话就转到菜单项6（本菜单文件中为下一菜单项）继续执行</span>  <br>
  <span class="bat">find</span> <span class="Options">--set-root</span> <strong>/boot/MicroPE.ISO</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;在所有设备的/boot/目录下查找 MicroPE.ISO文件，找到的话就将该设备设为根</span>  <br>
  <span class="bat">map </span><strong>/boot/MicroPE.ISO</strong> <span class="bat">(0xff)</span> <span class="Options">||</span> <span class="bat">map</span> <span class="Options">--mem</span>  <strong>/boot/MicroPE.ISO</strong> <span class="bat">(0xff)</span><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;先尝试将iso镜像直接仿真为 (0xff)（要求镜像连续存放），失败的话再将iso镜像载入内存仿真为(0xff)</span>  <br>
  <span class="bat">map</span> <span class="Options">--hook</span><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;使仿真生效</span>  <br>
  <span class="bat">chainloader</span> <strong>(0xff)</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;从(0xff)设备启动 </span>  <br>
<span class="bat">savedefault</span> <span class="Options">--wait=</span><strong>2</strong><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;将当前菜单项保存为默认菜单项，下次再加载本菜单文件时自动将当前菜单项设置为默认菜单项</span></p>
<p><span class="Options">title</span> <strong>Parted Magic ISO</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置菜单项标题</span> <br>
  <span class="bat">fallback</span><strong> 7</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;本项菜单执行出错的话就转到菜单项7（本菜单文件中为下一菜单项）继续执行</span> <br>
  <span class="bat">find</span> <span class="Options">--set-root</span><strong> /pmagic.iso</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;在所有设备的根目录下查找 pmagic.iso文件，找到的话就将该设备设为根</span> <br>
  <span class="bat">map </span><strong> /pmagic.iso </strong> <span class="bat">(0xff)</span> <span class="Options">||</span> <span class="bat">map</span> <span class="Options">--mem</span><strong> /pmagic.iso </strong> <span class="bat">(0xff)</span><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;先尝试将iso镜像直接仿真为 (0xff)（要求镜像连续存放），失败的话再将iso镜像载入内存仿真为(0xff)</span> <br>
  <span class="bat">map</span> <span class="Options">--hook</span><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;使仿真生效</span> <br>
  <span class="bat">chainloader</span> <strong>(0xff)</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;从(0xff)设备启动 </span> <br>
  <span class="bat">savedefault</span> <span class="Options">--wait=</span><strong>2</strong><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;将当前菜单项保存为默认菜单项，下次再加载本菜单文件时自动将当前菜单项设置为默认菜单项</span></p>
<p><span class="Options">title</span> <strong>Ultimate Boot CD ISO</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置菜单项标题</span> <br>
<span class="bat">fallback</span><strong> 8</strong><br>
<span class="Notes"># &nbsp;&nbsp;&nbsp;本项菜单执行出错的话就转到菜单项8（本菜单文件中为下一菜单项）继续执行</span> <br>
<span class="bat">find</span> <span class="Options">--set-root</span> <strong>/ubcd.iso</strong><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;在所有设备的根目录下查找 ubcd.iso文件，找到的话就将该设备设为根</span> <br>
<span class="bat">map </span><strong>/ubcd.iso </strong><span class="bat">(0xff)</span> <span class="Options">||</span> <span class="bat">map</span> <span class="Options">--mem</span><strong> /ubcd.iso </strong> <span class="bat">(0xff)</span><br>
<span class="Notes"># &nbsp;&nbsp;&nbsp;先尝试将iso镜像直接仿真为 (0xff)（要求镜像连续存放），失败的话再将iso镜像载入内存仿真为(0xff)</span> <br>
<span class="bat">map</span> <span class="Options">--hook</span><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;使仿真生效</span> <br>
<span class="bat">chainloader</span> <strong>(0xff)</strong><br>
<span class="Notes"># &nbsp;&nbsp;&nbsp;从(0xff)设备启动 </span> <br>
<span class="bat">savedefault</span> <span class="Options">--wait=</span><strong>2</strong><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;将当前菜单项保存为默认菜单项，下次再加载本菜单文件时自动将当前菜单项设置为默认菜单项</span></p>
<p><span class="Options">title</span><strong> commandline</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置菜单项标题</span>  <br>
<span class="bat">commandline</span><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;进入命令行模式</span></p>
<p><span class="Options">title</span> <strong>floppy (fd0)</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置菜单项标题</span>  <br>
  <span class="bat">chainloader</span> <strong>(fd0)+1</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;链式加载(fd0)的第一个扇区内容</span>  <br>
<span class="bat">rootnoverify</span> <strong>(fd0)</strong><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;设置(fd0)为根设备，root在设置根设备前，会测试一下该分区的文件系统是否可以识别，而rootnoverify则省略这一测试</span></p>
<p><span class="Options">title</span> <strong>back to dos</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置菜单项标题</span><br>
<span class="bat">quit</span><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;返回到dos环境（如果是从dos环境进入grub4dos环境的话）</span></p>
<p><span class="Options">title</span> <strong>reboot</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置菜单项标题</span>  <br>
<span class="bat">reboot</span><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;重新启动计算机</span></p>
<p><span class="Options">title</span> <strong>halt</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置菜单项标题</span>  <br>
<span class="bat">halt</span><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;关闭计算机</span></p>
<p><span class="Options">title</span> <strong>MAXDOS.IMG</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置菜单项标题</span>  <br>
  <span class="bat">find</span> <span class="Options">--set-root --ignore-floppies </span><strong>/boot/MAXDOS.IMG</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;在所有设备的/boot/目录下查找 MAXDOS.IMG文件，忽略软驱设备，找到的话就将该设备设为根</span>  <br>
  <span class="bat">map</span> <span class="Options">--mem</span> <strong>/boot/MAXDOS.IMG</strong> <span class="bat">(fd0)</span><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;将img镜像载入内存后仿真为第一软驱(fd0)</span><br>
  <span class="bat">map</span> <span class="Options">--hook</span><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;使仿真生效</span>  <br>
  <span class="bat">chainloader</span> <strong>(fd0)+1</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;链式加载(fd0)的第一个扇区内容</span>  <br>
  <span class="bat">rootnoverify</span> <strong>(fd0)</strong><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;设置(fd0)为根设备，root在设置根设备前，会测试一下该分区的文件系统是否可以识别，而rootnoverify则省略这一测试</span></p>
<p>&nbsp;</p>
<p>  <br>
</p>
<p></p>
</body>
</html>
